package com.lgj.springboot_lgj.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lgj.springboot_lgj.bean.basic.BaseLog;
import com.lgj.springboot_lgj.dao.basic.BaseLogMapper;
import com.lgj.springboot_lgj.dao.ext.BaseLogExtMapper;
import com.lgj.springboot_lgj.service.IBaseLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author LDD
 * @date 2022/6/20 17:48
 */
@Service
public class BaseLogServiceImpl implements IBaseLogService {
    @Autowired
    private BaseLogExtMapper extmapper;
    @Autowired
    private BaseLogMapper mapper;
    @Override
    public PageInfo<BaseLog> pageQuery(int pageNum, int pageSize) {
        //设置分页信息
        PageHelper.startPage(pageNum,pageSize);
        List<BaseLog> list = extmapper.findAllByBaseLog();
        PageInfo<BaseLog> pageInfo=new PageInfo<>(list);
        return pageInfo;
    }
    @Override
    public void addBaseLog(BaseLog baseLog) {
//        baseLog.setLogTime(new Date());
//        mapper.insert(baseLog);
}
}
